﻿using BBI.Data.Contracts;
using BBI.Model;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;

namespace BBI.Data
{
    public class ArticlesRepository : EFRepository<Article>, IArticlesRepository
    {
        public ArticlesRepository(DbContext context) : base(context)
        {
            
        }
        /// <summary>
        /// 获得已发布文章
        /// </summary>
        /// <returns></returns>
        public IQueryable<Article> GetPublishArticles()
        {
            return DbSet.Where(a => a.Active);
        }
    }
}
